<?php
/**
 * @version : 1.0
 * @since June-2008
 * @package : lib
 * @subpackage struct
 * @name :  CSettingList
 * @todo:  Lớp  mở rộng  của CList
*/
class CSettingList extends CList 
{
	public $settings;
	function __construct($items=array())
	{
		parent::__construct($items);
		$this->settings = $this->make_settings($items);
	}
	function make_settings($items)
	{
		$settings = array();
		foreach($items as &$item)
		{
			$settings[$item['name']] = $item['value'];
		}
		return $settings;
	}
	function get($name)
	{
		if(isset($this->settings[$name]))
		{
			return $this->settings[$name];
		}
	}
}
function CSettingList($items=array())
{
	return new CSettingList($items);
}
?>